import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
// 引入初始化文件(样式)
import '@/styles/common.scss'

// 引入懒加入指令插件并且注册
import { lazyPlugin } from './directives'

// 将用户数据持久化 local Storage
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'



const app = createApp(App)
const pinia = createPinia()

app.use(pinia)
app.use(router)
app.use(lazyPlugin) //声明插件lazyPlugin，并且执行，然后执行install
app.use(ElementPlus)

// 注册持久化插件
pinia.use(piniaPluginPersistedstate)
app.mount('#app')

